#include <buola/gui.h>

#include <buola/image/cimage.h>
#include <buola/image/cgc.h>

#include <buola/widgets/cimagebox.h>

namespace buola { namespace gui {

CImageBox::CImageBox()
{
    SetBackNone();
}

CImageBox::~CImageBox()
{
}

void CImageBox::SetImage(const img::CPicture &pImage)
{
    mImage=pImage;

    Refresh();
}

///////////////// events //////////////////

void CImageBox::OnExpose(const CExposeEvent &pE)
{
    if(mImage)
        pE.mGC->DrawImage(CPoint_d(0,0),mImage);
}


/*namespace gui*/ } /*namespace buola*/ }
